<?
/**
* Copyright (c) 2002-2007 BioWare Corp.
* http://www.bigdaddymonitor.org
*
* This file is part of the BigDaddy Monitoring
* program. It is free software distributed under
* the terms of the BSD License. It is ditributed
* in the hopes that it will be useful, but
* WITHOUT ANY WARRANTY; without event the implied
* warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE.
*
* The BSD License is available from:
* http://www.opensource.org/licenses/bsd-license.php
**/
/* --------------------------------------------------------------------------------------//
	BigDaddy Site Initialization: THEME
	Created: Duleepa Wijayawardhana, March 12, 2004
	Copyright 2004 BioWare Corp.
//--------------------------------------------------------------------------------------*/

include(HEADER);

if ($pageParams["content"]!="")
{
	echo $pageParams["content"];
}
else if ($pageParams["include"]!="" && !is_array($pageParams["include"]))
{	
	if (file_exists($pageParams["include"]))
	{
		include($pageParams["include"]);
	}
	else
	{
		echo "<p>Error: No Content</p>";
	}
}
else
{
	preg_match("#(.*)\.(.*)#",$_SERVER["PHP_SELF"], $matches);
	if (file_exists($_SERVER["DOCUMENT_ROOT"].$matches[1].".inc"))
	{
		include($_SERVER["DOCUMENT_ROOT"].$matches[1].".inc");
	}
	else
	{
		echo "<p>Error: No Content</p>";
	}
}

//Include the Theme Footer File

include(FOOTER);

?>
